package com.leyou.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * @ClassName ExceptionEnum
 * @Date 2019/2/1 17:25
 */
@Getter
@NoArgsConstructor
@AllArgsConstructor
public enum ExceptionEnum {

    BRAND_NOT_FOUND(404,"没有查到此商品"),
    CATEGORY_NOT_FOUND(404,"无此商品"),
    BRAND_SAVE_ERROR(500,"品牌新增失败"),
    UPLOAD_FILE_ERROR(500,"文件上传失败"),
    INVALID_FILE_TYPE(500,"无效的文件类型"),
    SPEC_GROUP_NOT_FOUND(404,"商品分组未查到"),
    SPEC_PARAM_NOT_FOUND(404,"商品规格不存在"),
    GOODS_NOT_FOUND(404,"商品不存在"),
    GOODS_SAVE_ERROR(500,"新增商品失败"),
    GOODS_DETAIL_NOT_FOUND(404,"商品详情未找到"),
    GOODS_SKU_NOT_FOUND(404,"商品SKU未找到"),
    GOODS_UPDATE_ERROR(500,"商品更新失败"),
    GOODS_ID_CANNOT_BE_NULL(400,"商品id不能为空"),
    STOCK_NOT_FOUND(404,"商品库存未找到"),
    INVALID_USER_DATA_TYPE(400,"无效的用户数据类型"),
    INVALID_PHONE_CODE(400,"无效手机验证码"),
    INVALID_USERNAME_AND_PASSWORD(400,"用户名或密码错误"),
    UNAUTHORIZED(403,"无效的授权码"),
    CART_NOT_FOUND(500,"购物车为空"),
    INVALID_CART(500,"无效的购物车信息"),
    CREATED_ORDER_ERROR(500,"创建订单失败"),
    CREATED_ORDER_DETAIL_ERROR(500,"创建订单失败"),
    STOCK_NOT_ENOUGH(500,"库存不足"),

    SPU_NOT_FOUND(201, "SPU未查询到"),
    SKU_NOT_FOUND(201, "SKU未查询到"),

    RECEIVER_ADDRESS_NOT_FOUND(400, "收获地址不存在"),
    ORDER_NOT_FOUND(400, "订单不存在"),
    ORDER_STATUS_EXCEPTION(500, "订单状态异常"),
    CREATE_PAY_URL_ERROR(500, "常见支付链接异常"),
    WX_PAY_SIGN_INVALID(400, "微信支付签名异常"),
    WX_PAY_NOTIFY_PARAM_ERROR(400, "微信支付回调参数异常"),

    INVALID_FILE_FORMAT(400, "文件格式错误"),
    UPLOAD_IMAGE_EXCEPTION(500, "文件上传异常"),
    INVALID_PARAM(400, "参数错误"),
    USERNAME_OR_PASSWORD_ERROR(400, "账号或密码错误"),
    VERIFY_CODE_NOT_MATCHING(400, "验证码错误"),
    PASSWORD_NOT_MATCHING(400, "密码错误"),
    USER_NOT_EXIST(404, "用户不存在"),

    UPDATE_SPEC_PARAM_FAILED(500, "商品规格参数更新失败"),
    DELETE_SPEC_PARAM_FAILED(500, "商品规格参数删除失败"),
    SPEC_PARAM_CREATE_FAILED(500, "新增规格参数失败"),
    USER_NOT_LOGIN(401, "用户未登录，请登录"),


    SPEC_GROUP_CREATE_FAILED(500, "新增规格组失败"),
    DELETE_SPEC_GROUP_FAILED(500, "商品规格组删除失败"),
    UPDATE_SPEC_GROUP_FAILED(500, "商品规格组更新失败"),
    UN_PAY(500, "未支付")
    ;
    private int code;
    private String msg;
}
